package com.ztf.shopping.service;

import com.ztf.shopping.bean.Article;
import com.ztf.shopping.bean.Order;
import com.ztf.shopping.bean.User;

import java.util.List;
import java.util.Map;

public interface UserService {

    /**
     *注册的时候判断名字是否存在
     * @param name
     * @return
     */
    String registeredFindName(String name);

    /**
     * 登录
     * @param user
     * @return
     */
    User loginUser(User user);

    /**
     * 注册
     * @param regUser
     * @return
     */
    boolean registerServlet(User regUser);

    /**
     * 查找购物车
     * @param name
     * @return
     */
    List<Order> findAllShoppingCart(String name);

    /**
     * 确认注册
     */
    void sureRegister(String object);

    /**
     * 增加商品的数量
     * @param user
     * @param id
     * @param count
     */
    Map<String,String> addShopCount(Object user, String id, String count);

    /**
     * 减少商品的数量
     * @param user
     * @param id
     * @param count
     * @return
     */
    Map<String, String> lessShopCount(Object user, String id, String count);

    void delOrder(Object loginUser, String id);

    void addOrder(Object loginUser, String id);

    void payOrder(Object loginUser, String[] split);

    void changeUser(User loginUser);
}
